layui.use(['upload'], function () {
  var $ = layui.jquery,
    upload = layui.upload

  //拖拽上传
  upload.render({
    elem: '#test10',
    url: 'https://httpbin.org/post',
    done: function (res) {
      layer.msg('上传成功');
      layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
      console.log(res)
    }
  });


});